﻿<UserControl x:Class="SS.WPFusercontrol.Sale"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="433" d:DesignWidth="1031">
    <Grid ShowGridLines="True" IsManipulationEnabled="False" Height="443" Width="1044">
        <Button Content="添加" Height="23" HorizontalAlignment="Left" Margin="928,28,0,0" Name="InsertButton" VerticalAlignment="Top" Width="75" FontFamily="Global User Interface" FontSize="13" Click="InsertButton_Click" />
        <Label Content="ErrorLabel" Height="22" HorizontalAlignment="Left" Margin="94,48,0,0" Name="ErrorLabel" VerticalAlignment="Top" Width="243" Visibility="Hidden" FontWeight="Normal" Foreground="Red" />
        <Button Content="查询" Height="23" HorizontalAlignment="Left" Margin="928,92,0,0" Name="QueryButton" VerticalAlignment="Top" Width="75" FontFamily="Global User Interface" FontSize="13" Click="QueryButton_Click" />
        <Label Content="产品名称" Height="25" HorizontalAlignment="Left" Margin="15,17,0,0" Name="label1" VerticalAlignment="Top" Width="75" FontFamily="Global User Interface" FontSize="13" FontWeight="Normal" FontStyle="Normal" />
        <Label Content="备注" Height="25" HorizontalAlignment="Left" Margin="15,76,0,0" Name="label2" VerticalAlignment="Top" Width="75" FontFamily="Global User Interface" FontSize="13" FontWeight="Normal" />
        <TextBox Height="54" HorizontalAlignment="Left" Margin="94,76,0,0" Name="DesriptionTextbox" VerticalAlignment="Top" Width="381" AutoWordSelection="False" TextWrapping="Wrap" FontStretch="Normal" HorizontalScrollBarVisibility="Auto" />
        <DataGrid Height="220" HorizontalAlignment="Left" Margin="12,154,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="1004" SelectionMode="Single" CanUserResizeRows="False" EnableRowVirtualization="False" IsEnabled="True" AutoGenerateColumns="False" MouseDoubleClick="dataGrid1_MouseDoubleClick">
            <DataGrid.Columns>
                <DataGridCheckBoxColumn  IsReadOnly="False" ></DataGridCheckBoxColumn>
                <DataGridTextColumn Header="销售序号" Binding="{Binding SalesID}" FontFamily="Global User Interface" FontSize="15" FontStyle="Normal" Width="8*" IsReadOnly="True" />
                <DataGridTextColumn Header="销售日期" Binding="{Binding SalesDate}" FontFamily="Global User Interface" FontSize="15"  Width="12*" IsReadOnly="True"/>
                <DataGridTextColumn Header="产品序号" Binding="{Binding ProductID}" FontFamily="Global User Interface" FontSize="15" Width="8*" IsReadOnly="True"/>
                <DataGridTextColumn Header="产品名称" Binding="{Binding ProductName}" FontFamily="Global User Interface" FontSize="15" Width="10*" IsReadOnly="True"/>
                <DataGridTextColumn Header="客户名称" Binding="{Binding CustomerName}" FontFamily="Global User Interface" FontSize="15" Width="10*" IsReadOnly="True"/>
                <DataGridTextColumn Header="数量" Binding="{Binding SalesNumber}" FontFamily="Global User Interface" FontSize="15" Width="10*" IsReadOnly="True"/>
                <DataGridTextColumn Header="单价" Binding="{Binding UnitPrice}" FontFamily="Global User Interface" FontSize="15" Width="8*" IsReadOnly="True"/>
                <DataGridTextColumn Header="总金额" Binding="{Binding TotalSales}" FontFamily="Global User Interface" FontSize="15" Width="15*" IsReadOnly="True"/>
                <DataGridTextColumn Header="备注" Binding="{Binding SalesDescription}" FontFamily="Global User Interface" FontSize="15" Width="12*" IsReadOnly="True"/>
                <DataGridTextColumn Header="更新日期" Binding="{Binding SalesUpdateDate}" FontFamily="Global User Interface" FontSize="15" Width="12*" IsReadOnly="True"/>
            </DataGrid.Columns>
        </DataGrid>
        <Button Content="全选/全不选" Height="23" HorizontalAlignment="Left" Margin="12,377,0,0" Name="SelectAllButton" VerticalAlignment="Top" Width="75" Click="SelectAllButton_Click" />
        <Button Content="删掉" Height="23" HorizontalAlignment="Left" Margin="130,377,0,0" Name="DeleteButton" VerticalAlignment="Top" Width="75" Click="DeleteButton_Click" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="94,17,0,0" Name="ProductNamecomboBox" VerticalAlignment="Top" Width="132" />
        <Label Content="销售日期" Height="25" HorizontalAlignment="Left" Margin="674,20,0,0" Name="label3" VerticalAlignment="Top" Width="66" FontFamily="Global User Interface" FontSize="13" />
        <DatePicker Height="25" HorizontalAlignment="Left" Margin="769,20,0,0" Name="SalesDatePicker" VerticalAlignment="Top" Width="115" IsEnabled="True" />
        <Label Content="单价" Height="25" HorizontalAlignment="Right" Margin="0,65,281,0" Name="label4" VerticalAlignment="Top" Width="42" FontFamily="Global User Interface" FontSize="13" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="769,65,0,0" Name="UnitPriceTextBox" VerticalAlignment="Top" Width="115" />
        <Label Content="总金额" Height="25" HorizontalAlignment="Left" Margin="497,110,0,0" Name="label5" VerticalAlignment="Top" Width="66" FontFamily="Global User Interface" FontSize="13" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="592,110,0,0" Name="SalesTotalTextBox" VerticalAlignment="Top" Width="292" />
        <Label Content="销量" FontFamily="Global User Interface" FontSize="13" Height="25" HorizontalAlignment="Left" Margin="497,65,0,0" Name="label6" VerticalAlignment="Top" Width="66" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="592,65,0,0" Name="SalesNumberTextBox" VerticalAlignment="Top" Width="115" />
        <Label Content="客户名称" FontFamily="Global User Interface" FontSize="13" FontStyle="Normal" FontWeight="Normal" Height="25" HorizontalAlignment="Left" Margin="262,17,0,0" Name="label7" VerticalAlignment="Top" Width="75" />
        <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,17,569,0" Name="CustomerNameComboBox" VerticalAlignment="Top" Width="132" />
    </Grid>
</UserControl>
